package come.bjpowernode.javase.singleton;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class GetSingleton {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);

        Thread thread = new Thread(new MyRunnable());
        executorService.submit(thread);

        /*MyRunnable myRunnable = new MyRunnable();
        executorService.submit(myRunnable);*/

        /*executorService.submit(new MyRunnable());*/

        /*executorService.submit(MyRunnable::new);*/

        MyRunnable myRunnable = new MyRunnable();
        for (int i = 0; i < 100; i++) {
            executorService.submit(myRunnable);
        }
        executorService.shutdown();
    }
}

